<androidx.constraintlayout.widget.ConstraintLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:tools="http://schemas.android.com/tools"
    tools:context=".Activities.fragments.MainFragment"
    android:background="@color/white">

    <!-- TextView для заголовка -->
    <TextView
        android:id="@+id/titleApp"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="36dp"
        android:text="@string/tittleApp"
        android:textColor="@color/tittleAppColor"
        android:textSize="32sp"
        android:textStyle="bold"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <!-- CardView -->
    <androidx.cardview.widget.CardView
        android:id="@+id/cardViewContainer"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="16dp"
        android:layout_marginTop="50dp"
        app:cardCornerRadius="16dp"
        app:cardElevation="8dp"
        app:layout_constraintBottom_toTopOf="@+id/bottom_navigation"
        app:layout_constraintTop_toBottomOf="@+id/titleApp"
        app:layout_constraintVertical_bias="0.065"
        tools:layout_editor_absoluteX="16dp">

        <!-- Общий контейнер -->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:padding="16dp"
            android:background="@color/white">

            <!-- TextView "Откуда" -->
            <TextView
                android:id="@+id/textViewDeparture"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginHorizontal="8dp"
                android:layout_marginTop="8dp"
                android:text="@string/start"
                android:textColor="@color/dark_blue"
                android:textStyle="bold"/>

            <!-- Элемент Откуда -->
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="70dp"
                android:orientation="horizontal"
                android:background="@drawable/shape_rounded_containers">

                <ImageView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:background="@android:color/transparent"
                    android:src="@drawable/ic_depart"
                    android:layout_margin="15dp"/>

                <EditText
                    android:id="@+id/start_city"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:textColor="@color/black"
                    android:hint="@string/start"
                    android:textColorHint="@color/gray">
                </EditText>
            </LinearLayout>

            <!-- TextView "Куда" -->
            <TextView
                android:id="@+id/textViewReturn"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginHorizontal="8dp"
                android:layout_marginTop="16dp"
                android:text="@string/end"
                android:textColor="@color/dark_blue"
                android:textStyle="bold"/>

            <!-- Элемент куда -->
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="70dp"
                android:orientation="horizontal"
                android:background="@drawable/shape_rounded_containers">
                <ImageView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:background="@android:color/transparent"
                    android:src="@drawable/ic_arrivals"
                    android:layout_margin="15dp"/>

                <EditText
                    android:id="@+id/end_city"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:textColor="@color/black"
                    android:hint="@string/end"
                    android:textColorHint="@color/gray">
                </EditText>
            </LinearLayout>

            <!-- Кнопка "Поиск" -->
            <Button
                android:id="@+id/searchButton"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="16dp"
                android:background="@drawable/rounded_button"
                android:elevation="4dp"
                android:text="Поиск билетов"
                android:textColor="@android:color/white"/>
        </LinearLayout>
    </androidx.cardview.widget.CardView>

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/tickets"
        android:layout_width="match_parent"
        android:layout_height="370dp"
        app:layout_constraintBottom_toTopOf="@+id/bottom_navigation"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/cardViewContainer"
        app:layout_constraintVertical_bias="0.225"
        tools:listitem="@layout/item_ticket" />

</androidx.constraintlayout.widget.ConstraintLayout>